home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / lib / makedir.pl < prev    next >
Perl Script  |  1995-05-04  |  468b  |  21 lines

  1. #! /usr/unsupported/bin/perl
  2. foreach $file (<*.imf>) {
  3.     open(IMF,"<$file") || warn "Cannot open $file.\n";
  4.     while (<IMF>) {
  5.     if (/imf\s*\"([^\"]*)\"/) {
  6.         $imf = $1;
  7.         if ($where{$imf} && $where{$imf} ne $file) {
  8.         warn "Family $imf present in files $where{$imf} and $file.\n";
  9.         } else {
  10.         $where{$imf} = $file;
  11.         }
  12.     }
  13.     }
  14. }
  15.  
  16. print "ImageFamilyName FileName\n";
  17. foreach $imf (sort keys(%where)) {
  18.     print "$imf $where{$imf}\n";
  19. }
  20. print ". .\n";
  21.